﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace SourceRestore
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            if (Properties.Settings.Default.NewVersion)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.NewVersion = false;
                Properties.Settings.Default.Save();
            }

            if (args.Length > 0)
            {
                if (args[0].ToUpper().EndsWith(".ZIP"))
                {
                    Properties.Settings.Default.LastZipFile = args[0];
                    Properties.Settings.Default.Save();
                }
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
    }
}
